Storing and expiring non-tcp traffic

ABSTRACT

Present disclosure provides techniques for dynamically determining how to store and expire non-TCP traffic in a network environment. In some examples, aspects of the present disclosure may implement a state machine operated by the server for managing non-TCP traffic. Critically, in accordance with aspects of the present disclosure, non-TCP traffic may be combined with the use of multiple memory partitions and an expiry algorithm that supports dynamic scaling of non-TCP traffic while achieving faster connection speed, higher system performance, and lower time complexity.

CLAIM OF PRIORITY UNDER 35 U.S.C. §120

The present application claims priority to Provisional Application No.62/367,373 entitled “STORING AND EXPIRING NON-TCP TRAFFIC,” and filedJul. 27, 2016, which is assigned to the assignee hereof and herebyexpressly incorporated by reference herein.

BACKGROUND

In recent years, implementation of “cloud-based” services,high-performance computing (HPC), compute servers, and other activitiesemploying data centers and the like have seen widespread adoption. Undera typical data center installation, a large number of servers installedin server chassis and server racks are interconnected in communicationusing network links (e.g., Ethernet) and various switching mechanisms.The data center systems generally rely on a “pull” paradigm where theresources may be stored at the server site and clients may be allowed topull the resources from the server by issuing one or more requests tothe server. For example, with respect to a client application such as aweb browser, the client application may communicate with the serverusing an application-level protocol, e.g., HyperText Transfer Protocol(HTTP), built on top of the Transport Control Protocol (TCP). However,not all internet applications use TCP. Non-TCP applications areconstantly growing and generating non-TCP traffic at the servers, andmay include applications such as internet audio players, internetprotocol (IP) telephony, videoconferencing, and real-time applications.

In some cases, performance of the network can be impacted by any numberof factors, including bandwidth congestion and inefficient memoryutilization. Resolving potential issues may be flow type determinative.Particularly, because TCP traffic (e.g., information related to and/orincluding the exchange of data packets using TCP) is a“connection-oriented” traffic and non-TCP traffic (e.g., informationrelated to and/or including the exchange of data packets not using TCP)is a “connection-less traffic,” the server may resolve one or moreissues that arise differently depending on the type of traffic that isbeing processed. For example, upon encountering congestion, allcontending TCP flows reduce their data rates in an attempt to dissolvethe congestion while non-TCP flows continue to send at their originalrate even after encountering bandwidth congestion, thus resulting inpotential packet loss. Storing states and information about non-TCPtraffic may also be important for network firewall operations and packetauthorization.

Conventional systems fail to address the diverging characteristics ofnon-TCP traffic in terms of memory utilization. However, determining howto store and when to expire (e.g., delete) information related to TCPand non-TCP traffic from memory may be critical for efficient memoryutilization and improving network performance. For example, storinginformation related to non-TCP traffic in a single data structure (e.g.,table) may result in resource contention if multiple processors orthreads attempt to access the same resource concurrently. In contrast,storing information related to the non-TCP traffic across a large numberof non-TCP traffic data structures may consume higher memory, highercentral processing unit (CPU) utilization, and result in frequentcreation and insertion of traffic information. In particular, consumingmemory, CPU, or other system resources is crucial and of utmostimportance for kernel-mode services, applications, and drivers. Inkernel-mode environment, inefficient services can lead to poor systemperformance, failures, and crashes.

SUMMARY

In some examples, a method, apparatus, and a computer readable mediumare provided that addresses the above-identified issues of dynamicallydetermining how to store and expire non-TCP traffic in a networkenvironment. In some examples, the present disclosure may implement astate machine operated by the server for managing non-TCP traffic. Inparticular, in some examples, the non-TCP traffic may be combined withthe use of multiple memory partitions and an expiry algorithm thatsupports dynamic scaling of non-TCP traffic while achieving fasterconnection speed, higher system performance, and lower time complexity.

In some examples, the present disclosure provides a system that adoptsmultiple partitions and hashing tables that may be scalable according tothe number of active processors or threads. In some aspects, an optimalhashing function may be utilized to ensure uniform distribution ofnon-TCP traffic across the multiple partitions. Additionally oralternatively, a state machine implemented by the server may manage thelifetime of non-TCP traffic by relying on either cleanup intervals thatscale with the number of stored traffic in the system or is based onmemory event triggers that may cleanup the expired non-TCP traffic fromthe memory based on the memory availability.

In accordance with one example of the present disclosure, a method ofmanaging non-TCP packets is disclosed. The method may comprisemonitoring, at a server, a non-TCP endpoint parameter in a memory of theserver. In some aspects, the method may further include determiningwhether the non-TCP endpoint parameter is outside of a range defined bya lower threshold and an upper threshold. In some examples, the lowerthreshold and the upper threshold may be either respective numbers ofnon-TCP endpoints stored in the memory or respective memory utilizationvalues corresponding to the non-TCP endpoints stored in the memory. Themethod may further include adjusting an endpoint lifetime value and acleanup interval value associated with maintaining the non-TCP endpointsstored in the memory in response to the non-TCP endpoint parameter beingoutside the range defined by the lower threshold and the upperthreshold. Additionally or alternatively, the method may includeremoving one or more of the non-TCP endpoints from the memory of theserver in response to at least one of the adjusted endpoint lifetimevalue and the adjusted cleanup interval value.

In accordance with another example of the present disclosure, a computerdevice for managing non-TCP packets is disclosed. The computer devicemay include a processor and a memory coupled to the processor. In someexamples, the memory may include instructions executable by theprocessor to monitor, at a server, a non-TCP endpoint parameter in amemory of the server. In some aspects, the instructions may furtherinclude determining whether the non-TCP endpoint parameter is outside ofa range defined by a lower threshold and an upper threshold. The lowerthreshold and the upper threshold may be either respective numbers ofnon-TCP endpoints stored in the memory or respective memory utilizationvalues corresponding to the non-TCP endpoints stored in the memory. Theinstructions may further be executable by the processor to adjust anendpoint lifetime value and a cleanup interval value associated withmaintaining the non-TCP endpoints stored in the memory in response tothe non-TCP endpoint parameter being outside the range defined by thelower threshold and the upper threshold. Additionally or alternatively,the instructions may include removing one or more of the non-TCPendpoints from the memory of the server in response to at least one ofthe adjusted endpoint lifetime value and the adjusted cleanup intervalvalue.

In accordance with yet another example, a computer readable medium formanaging non-TCP packets is disclosed. The computer-readable medium mayinclude instructions for monitoring, at a server, a non-TCP endpointparameter in a memory of the server. In some aspects, the instructionsmay further include determining whether the non-TCP endpoint parameteris outside of a range defined by a lower threshold and an upperthreshold. The lower threshold and the upper threshold may be eitherrespective numbers of non-TCP endpoints stored in the memory orrespective memory utilization values corresponding to the non-TCPendpoints stored in the memory. The instructions may further includeadjusting an endpoint lifetime value and a cleanup interval valueassociated with maintaining the non-TCP endpoints stored in the memoryin response to the non-TCP endpoint parameter being outside the rangedefined by the lower threshold and the upper threshold. Additionally oralternatively, the instructions may include removing one or more of thenon-TCP endpoints from the memory of the server in response to at leastone of the adjusted endpoint lifetime value and the adjusted cleanupinterval value.

The foregoing has outlined rather broadly the features and technicaladvantages of examples according to the disclosure in order that thedetailed description that follows may be better understood. Additionalfeatures and advantages will be described hereinafter. The conceptionand specific examples disclosed may be readily utilized as a basis formodifying or designing other structures for carrying out the samepurposes of the present disclosure. Such equivalent constructions do notdepart from the scope of the appended claims. Characteristics of theconcepts disclosed herein, both their organization and method ofoperation, together with associated advantages will be better understoodfrom the following description when considered in connection with theaccompanying figures. Each of the figures is provided for the purpose ofillustration and description only, and not as a definition of the limitsof the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram illustrating an example of network architecture inwhich the present aspects may operate.

FIG. 2 is a diagram illustrating an example of memory management systemimplemented in a computer device (e.g., server) in accordance withvarious aspects of the present disclosure.

FIG. 3 is a flowchart of a method that summarizes the steps necessary tostore, look-up, or delete endpoints from a target partition inaccordance with aspects of the present disclosure.

FIG. 4A is a diagram illustrating an example of state machineimplemented by the computer device (e.g., server) for managing endpointlifetime and Deferred Procedure Call (DPC) cleanup interval based on anumber of stored traffic in the memory.

FIG. 4B is a diagram illustrating another example of state machineimplemented by the computer device (e.g., server) for managing endpointlifetime and Deferred Procedure Call (DPC) cleanup interval based onmemory utilization factor.

FIGS. 5A-5C are timing diagrams illustrating memory cleanup proceduresbased on various triggers in accordance with aspects of the presentdisclosure.

FIG. 6 is a flowchart of a method, implemented by the computer device,for selecting one or more cleanup procedure(s) based on memoryavailability trigger.

FIG. 7 is a flow chart of a method implemented on the computer device inaccordance with various aspects of the present disclosure.

FIG. 8 is a diagram illustrating an example of a hardware implementationfor a computer device in accordance with various aspects of the presentdisclosure.

DETAILED DESCRIPTION

The detailed description set forth below in connection with the appendeddrawings is intended as a description of various configurations and isnot intended to represent the configurations in which the conceptsdescribed herein may be practiced. The detailed description includesspecific details for the purpose of providing a thorough understandingof various concepts. However, it will be apparent to those skilled inthe art that these concepts may be practiced without these specificdetails. In some instances, well known structures and components areshown in block diagram form in order to avoid obscuring such concepts.

In some examples, the present disclosure may address the problemidentified in the conventional systems where the partitions aregenerally fixed or predetermined irrespective of the number of activeprocessors in the system or the amount of endpoints that needed to bestored. The conventional systems therefore suffer in memory and CPUutilization because storing information related to non-TCP traffic,referred to herein as “non-TCP endpoint information” or “non-TCPendpoints,” in a single data structure may result in a resourcecontention if there are multiple processors or multiple threadsaccessing the same resource at the same time. Conversely, storing thenon-TCP traffic endpoint information across a large number of memorypartitions based on predetermined conditions may consume higher memoryand CPU power that generally results from creation and insertion oftraffic into large partitions. Further, such systems may suffer fromslower look up operations and network speeds because a system must lookacross a large number of partitions for the endpoint entry in a table.For the purposes of the present disclosure, the term “endpoint” mayrefer to a non-TCP connection which is defined by a local endpoint and aremote endpoint. By extension, the term “endpoint lifetime” may specifya length of time that a non-TCP endpoint has to be inactive in order tobe classified as idle in the memory.

Therefore, in some examples, the present disclosure employs a statemachine for storing information of the non-TCP traffic that is combinedwith the use of multiple memory partitions and an expiry algorithm tosupport dynamic scaling of number of non-TCP traffic while at the sametime achieving faster connection speed, higher system performance, andlower time complexity. For example, the state machine operates todynamically adjust an expiry rate of non-TCP endpoints based on either anumber of endpoints stored in a memory of the system, e.g., to accountfor changes in an incoming rate of new endpoints (e.g., creation rate)or a memory utilization factor. In one embodiment, the system and methodmay be implemented in a kernel mode (as opposed to the user modeapplication) where an application may have access to the system memory.Thus, in such situation, if the kernel mode fails to manage the memoryusage properly, the failure may result in the system crash. In otherwords, the state machine dynamically adjusts the expiry rate based onthe incoming rate to avoid the memory from becoming full, which wouldlead to packet losses. In some implementations, a computer device maydynamically adjust the number of memory partitions based on the numberof processors (e.g., as the processors/cores are hot added or removed).Additionally or alternatively, the computer device disclosed hereindistributes the information of the non-TCP traffic across the multiplememory partitions in a uniform manner. For example, some implementationsmay utilize an optimal hash function (e.g., Teoplitz hash) that achievesuniform distribution of non-TCP traffic across the multiple partitions.As such, no one partition may be over utilized while one or morepartitions are underutilized. In further aspects, the computer devicediscussed in the present disclosure may employ (comprise) a statemachine (see FIGS. 4A and 4B) that manages endpoint lifetime and memorycleanup operations (e.g., Deferred Procedure Call (DPC)) may utilizecleanup intervals to allow sufficient and routine removal of idlenon-TPC endpoints as their numbers increase in the memory. The term“idle” may specify a time period (e.g., “endpoint lifetime value”)during which stored information relating to a particular non-TCPendpoint has not been accessed. Thus, in some aspects, the computerdevice may identify the number of non-TCP endpoints that are stored inone or more partitions of the memory that have not been accessed for aparticular time period (e.g., 60 seconds (s)).

Accordingly, in some examples, the state machine efficiently manages thememory to remove idle non-TCP endpoints by dynamically adjusting anendpoint removal rate to be equal to or greater than an endpointcreation rate (i.e., number of endpoints that are being entered into thememory). As such, the present aspects may achieve improved performanceof the system. Absent the techniques described herein, the addition ofan increasing number of non-TCP endpoints without adequate removal wouldlead to an unsustainable system. Also, such a system would beunresponsive, provide slower connection speed, and lookup or retrievalfrom the hash tables, thereby negatively effecting the quality ofservice.

Turning first to FIG. 1, a network system 100 includes a computer device105 (e.g., server) in communication with one or more clientapplication(s) 115 (e.g., client application 115-a, client application115-b, and client application 115-c) over a network 110. In someexamples, the network 110 may be wired or wireless network. The computerdevice 105 may also be in communication with data store 120 that mayinclude data (e.g., TCP or non-TCP traffic/data packets) requested bythe one or more client application(s) 115.

In some examples, the one or more client applications 115 may beconfigured to establish a TCP connection or non-TCP connection with thecomputer device 105. For example, with respect to client application 115such as a web browser, the client application 115 may communicate withcomputer device 105, e.g., the server, using an application-levelprotocol HTTP built on top of the TCP. However, not all internetapplications use TCP. As noted above, non-TCP traffic applications areconstantly growing, and may include client applications 115 such asinternet audio players, internet protocol (IP) telephony,videoconferencing, real-time applications, and the like.

Non-TCP traffic, including User Datagram Protocol (UDP) and InternetControl Message Protocol (ICMP), may be required for network andInternet connectivity. Deciding on how to store and when to expirenon-TCP traffic may be critical for the connection speed, security, andoverall system performance. Additionally, based on the characteristicsof TCP packets and non-TCP packets, resolving potential issues may beflow type determinative. Particularly, because TCP traffic is a“connection-oriented” traffic and non-TCP traffic is a “connection-lesstraffic,” the computer device 105 may resolve one or more issues thatarise differently depending on the type of traffic that is beingprocessed.

In some examples, the computer device may dynamically determine how tostore and expire non-TCP traffic in a network environment. In someexamples, aspects of the present disclosure may implement a statemachine operated by the computer device 105 for managing non-TCPtraffic. Further, the non-TCP traffic may be combined with the use ofmultiple memory partitions and an expiry algorithm that supports dynamicscaling of non-TCP traffic while achieving faster connection speed,higher system performance, and lower time complexity. Further details onthe various techniques provided by the present disclosure are describedin detail with reference to FIGS. 2-8 below.

FIG. 2 is a diagram illustrating an example of memory management system200 implemented in a computer device 105 in accordance with variousaspects of the present disclosure. In some examples, the memorymanagement system 200 may include a memory manager 220 in communicationwith the memory 230 to manage storage and expiry of information relatedto non-TCP traffic, e.g., non-TCP endpoints. In some aspects, the memorymanagement system 200 may be part of the computer device 105 asdescribed with reference to FIG. 1. For reference, interface “A” in FIG.2 may be an interface for endpoint insertion, lookup and deletion. Incontrast, interface “B” may be an interface for endpoint expiry asdescribed in accordance with aspects of the present disclosure.

In some examples, the memory 230 may include one or more (e.g., up toany number n) memory partitions 205 (specifically partition 205-a,partition 205-b, partition 205-c, and partition 205-n). Further, eachmemory partition 205 may include memory locations, e.g., a hash table215 in this example, for storing information related to respectivenon-TCP endpoints. In an aspect, the number n may be determined based onthe number of active processors (see FIG. 8) or threads that are in thecomputer device 105. Thus, in this example, computer device 105 may beconfigured to dynamically adjust the number of partitions 205-a to 205-nand hash tables 215-a to 215-n associated with the one or morepartitions 205 according to the number of active processors. In someaspects, each non-TCP endpoint may be uniformly stored into one of theplurality of hash tables 215 such that no one partition 205 is overutilized in comparison to the other partitions 205 created in the memory230. In some aspects, the number of partitions 205 may be adjusted ifthere is a hot add or removal event (e.g., an event that indicates acore has been added or removed from the system without restarting themachine hardware).

The memory management system 200 may further include one or more (e.g.,up to any number n) reader-writer locks 210 such that each lock isassociated with a different partition 205, thus avoiding contentions ona single lock by a plurality of processors. In some examples, the one ormore non-TCP packets may be retrieved from data store 120 as describedwith reference to FIG. 1. The computer device 105 may utilize a uniformdistribution mechanism, such as but not limited to a hash function 225(e.g., Toeplitz hash function), such that each non-TCP endpoint or datapacket may be hashed into one of the plurality of partitions 205. Thehash function 225 may ensure uniform distribution for the number ofendpoints stored in each partition 205. Features of the hash function225 are described in further detail with reference to FIG. 3 (infra).

In some aspects, memory manager 220 may be configured to implement DPCcleanup intervals of the one or more partitions 205. Particularly, thecomputer device of the present disclosure may use multiple states (seestate-machine FIGS. 4A and 4B) for describing endpoint lifetime andcleanup intervals that are based on the number of endpoints in thesystem. For instance, in one example, if the number of endpoints exceedsa specified endpoint threshold (e.g., N>2,000 endpoints), the endpointlifetime may be subsequently shortened (e.g., from 60 seconds to 30seconds) so that an adequate number of endpoints are removed from thememory 230 in order to improve (e.g., increase a speed of) operationsfor endpoint lookup and retrieval.

In another example, the memory manager 220 may be configured to executecleanup operations based on the memory utilization factor (See FIG. 4B).For example, as the utilization of memory (i.e., amount of memory thatis occupied or in use) increases, the memory manager 220 may employ moreaggressive techniques (e.g., via shortening endpoint lifetime andcleanup intervals) to effectively manage the overall memory of theserver. Additionally or alternatively, the memory manager 220 mayimplement a memory availability trigger that is executed when theavailable system memory falls below a predetermined threshold. Thus, inthis case, in order to free available memory, the computer device 105may increase the frequency of the DPC procedures to be triggeredcontinuously (see FIG. 5B) until such time that the available memoryexceeds the predetermined threshold.

FIG. 3 is a flowchart of a method 300 that summarizes the actionsassociated with one example implementation to store, look-up, or deleteendpoints from a target partition in accordance with aspects of thepresent disclosure. In some aspects, computer device 105 may operatememory management system 200 to perform the actions identified in method300.

At block 305, the method 300 may include receiving inbound or outboundrequest at the computer device 105. In some examples, the requests maybe initiated by one or more client applications 115 or by the computerdevice 105, e.g., server, itself. At block 310, the method 300 mayinclude extracting packet tuples. In one or more examples, a hashfunction 225 (including, but not limited to, Teoplitz hash) may be usedto distribute the non-TCP endpoints evenly among the multiple partitions205 of the memory 230. The Teoplitz hash function may provide anapproximate uniform distribution for the number of endpoints across allpartitions 205. In some examples, the Teoplitz hash function may becalculated from a 3-tuple (Remote IP address, Remote Port, Local Port)of the UDP packet, and in case of an ICMP packet, additional tuples maybe used (ICMP ID, ICMP type, ICMP code). In both UDP and ICMP, hashfunction 225 may include a secret key. In some aspects, the secret keymay be used to prevent a hacker, for example, from obtaining the hashkey. Employment of such procedures may prevent malicious parties fromissuing Denial of Service (DoS) attacks that may negatively impact thequality of service of computer device 105. Thus, at block 315, themethod 300 may include using the Teoplitz hash to generate a 32-bit hashkey. Although the illustrated method is described with respect tonon-limiting example of a Teoplitz hash, it should be appreciated bythose of ordinary skill that any alternative hashing function that maybe suitable for the underlying functionalities of the state machinedescribed herein may be used.

At block 320, the method 300 may further include masking the first inleast significant bits to index the respective non-TCP endpoint into oneof the plurality of partitions 205. In some examples, “m” may be aninteger. The partition 205, where a non-TCP endpoint would be stored,looked-up, or deleted, may be chosen by using a part of the hash key toindex into the target partition 205. A number of least-significant bits,in, from the hash key enumerating to the number of partitions 205 areused to index each endpoint into one of the partitions 205. Accordingly,at block 325, the method may include storing, looking-up or deletingendpoints from one or more of the partitions 205 based on the techniquesdescribed herein.

FIG. 4A is a diagram illustrating an example of a state machine 400implemented by the computer device 105 (e.g., server) operating memorymanagement system 200 for managing endpoint lifetime and DPC cleanupintervals or memory triggers based on a number of non-TCP endpointsstored in the memory. In some examples, the state machine 400 and thetechniques associated with the state machine 400 may be managed andexecuted by the memory manager 220 (see FIG. 2) either independently orin collaboration with the processor 805 (see FIG. 8). In accordance withvarious aspects, the lifetime of the endpoints (e.g., non-TCP endpoints)may be maintained by a state-machine that is executed by the processor805 (see FIG. 8) of the computer device 105. In one or more examples,the processor 805 and memory manager 220 may be jointly or independentlyresponsible for managing the memory 230 of computer device 105 inaccordance with the state machine 400 described herein.

As noted previously, the term “endpoint” may refer to a non-TCPconnection which is defined by a local endpoint and a remote endpoint,and information associated therewith and/or with data packets exchangedthere between. In some aspects, the endpoints may also refer to thenon-TCP packets received from, and/or transmitted or queued fortransmission to, one or more client applications 115. Each of aconfigurable number of states (e.g., first state 405, second state 410,third state 415, and fourth state 420) of the state machine 400 may havea lower threshold and an upper threshold. The lower threshold and theupper threshold may be either respective numbers of non-TCP endpointsstored in the memory or respective memory utilization valuescorresponding to the non-TCP endpoints stored in the memory.

In one example, the lower threshold and upper threshold may define anumber of endpoints that trigger a switch to another state (e.g.,between first state 405 and a second state 410, second state 410 andthird state 415, etc.). In the instance where the computer devicedetermines whether the non-TCP endpoint parameter is outside of a rangedefined by a lower threshold and an upper threshold with respect to thenumber of endpoints, the lower threshold and upper threshold may bedescribed as lower endpoint threshold and upper endpoint threshold. Insome examples, the term “non-TCP endpoint parameter” may refer to avalue corresponding to either a respective numbers of non-TCP endpointsstored in the memory or a value associated with the memory utilizationbased on the non-TCP endpoints stored in the memory.

In the illustrated non-limiting example, the first state 405, the upperendpoint threshold may be N=2000 endpoints. Because the first state 405is the initial state, the lower endpoint threshold may be set at N=0endpoints. Conversely, for the second state 410, the upper endpointthreshold may be, for example, N=3,000 endpoints, while the lowerendpoint threshold may be N=2,000 endpoints. Thus, as will be describedbelow, the computer device may adjust an endpoint lifetime value and acleanup interval value in response to the non-TCP endpoint parameterbeing outside the range defined by the lower threshold and the upperthresholds. It should be noted that although only four states aredescribed with reference to state machine 400, one of ordinary skillwould appreciate that any number greater or less than the four statesmay be employed to achieve the goals of the present disclosure, e.g.,depending on, for example, a level of granularity desired in managingmemory 230.

Thus, as described above, at the first state 405, the upper thresholdmay be first upper endpoint threshold 425 set at, for example, 2,000endpoints. During the first state 405, the lower threshold may be firstlower endpoint threshold 425 set at, for example, zero endpoints. Itshould be appreciated by those of ordinary skill that any value forthreshold levels can be established by the computer device 105, or setby an operator of the system, and the illustrated examples of a valuesof 2,000 and zero for first upper and lower endpoint threshold, a valueof 3,000 for second upper endpoint threshold 430, a value of 2,000 forsecond lower endpoint threshold 437, and a value of 15,000 for thirdupper endpoint threshold 435 respectively illustrated in FIG. 4A shouldnot be construed as limiting in any way.

In some aspects, each state may correspond with an endpoint lifetimevalue 440 and a cleanup interval value (e.g., DPC interval 445). In someexamples, for the first state 405, the endpoint lifetime value may beset at first endpoint default value (e.g., 60 seconds) and the cleanupinterval value may be set at a first interval default value (e.g., 60seconds). In some examples, the term “default value” may refer to theinitial value set by the computer device 105 or the adjusted value thatrepresents the change from the initial first value to the adjustedsecond value. The computer device 105 may transition between differentstates depending on the number of endpoints, N, in the system. Forexample, the computer device 105 may identify a number of non-TCPendpoints that are stored in memory 230. In some examples, the computerdevice 105 may identify the number of non-TCP endpoints or packets thatare stored in one or more partitions 205 of the memory 230.

If the computer device 105 with state machine 400 in a particular statedetermines that the number of non-TCP endpoints is not outside of arange defined by a lower threshold and an upper threshold, the computerdevice 105 would trigger DPC cleanup of idle non-TCP endpoints at thespecified intervals (See FIG. 5A) based on the endpoint lifetime valueand the cleanup interval value defined for the specific state. In someaspects, determining the number of non-TCP endpoints that are idle maycomprise determining whether a period of time since the non-TCP endpointwas accessed has exceeded an idle threshold (as defined by the endpointlifetime value). As will be described later with reference to FIG. 5A,the DPC may be a kernel-mode procedure, and thus run for a predeterminedmaximum time period (e.g., 100 ms). Thus, in this example that operatesduring the first state 405, the DPC may be triggered every 60 seconds,wherein for each trigger, the DPC procedure may execute for 100 ms each.

However, in the case of starting in the first state 405 and consideringan increase in the number of endpoints, if at any point the number ofnon-TCP endpoints is outside the range defined by the lower thresholdand the upper threshold (e.g., if the number of non-TCP endpointsexceeds the first upper endpoint threshold of N=2,000), then statemachine 400 may transition to second state 410 where the endpointlifetime value 440 may be shortened (e.g., from 60 s to 30 s) and theDPC interval 445 may also be reduced (e.g., from 60 s to 40 s) in orderto allow the system to prune (e.g., remove from one or more partitions205 of the memory 230) greater number of endpoints as their incomingnumber increases. Such dynamic adjustment achieves improved performancefor the system because allowing the number of endpoints to increasewithout pruning them at an adequate rate equal to or higher than theendpoint creation rate may eventually lead to an unsustainable systemwhere the memory 230 may be required to carry large numbers of endpointsin the system. This leads to an unresponsive system, slower connectionspeed, lookup or retrieval from the partitions 205, and in one example,from the hash tables 215.

Continuing with the illustrated example, if at the second state 410, thecomputer device 105 determines that the number of non-TCP endpoints isfurther outside the second upper endpoint threshold 430 (e.g., N>3,000),then state machine 400 may transition to third state 415, where theendpoint lifetime value 440 may be further shortened (e.g., 30 s to 15s) and the DPC interval 445 may also be additionally reduced (e.g., 40 sto 15 s) in order to allow the system to remove idle endpoints from oneor more partitions 205 of the memory 230 at an increased rate.Similarly, if at the third state 415, the computer device 105 stilldetermines that the number of non-TCP endpoints exceeds third upperendpoint threshold 435 (e.g., 15,000), the endpoint lifetime value andthe DPC interval may be reduced even further (e.g., 15 s to 6 s, and 15s to 5 s, respectively). Such situation may arise when the number ofincoming requests exceeds the number of outgoing non-TCP packets.

In contrast, considering a decrease in the number of endpoints, if, atany state (e.g., such as the second state 410 in the following example),the computer device 105 determines that the number of non-TCP endpointsis outside the range defined by the lower threshold and the upperthreshold (e.g., when the number of endpoints falls below the secondlower endpoint threshold 427 associated with the particular state, thecomputer device 105 may operate state machine 400 to change states andadjust the endpoint lifetime value 440 and the DPC interval 445 to anearlier state (e.g., in one example, returning from the second state 410to the first state 405) by increasing the endpoint lifetime and the DPCinterval before the memory cleanup is required.

FIG. 4B is a diagram illustrating another example of state machine 450implemented by the computer device (e.g., server) for managing endpointlifetime and DPC cleanup interval based on memory utilization factor,“U”, where “U”ε[0, 1] (i.e., any value between 0-1 representing level ofmemory that is currently in-use or occupied). In some aspects, thememory utilization factor may be a represented as a percent of totalmemory that is either occupied or in-use. As the utilization of memoryincreases, the computer device 105 may employ more aggressive techniques(e.g., reduced endpoint lifetime and frequent cleanup intervals) toeffectively manage the overall memory of the server.

As with the state machine in FIG. 4A, the state machine 450 may includea plurality of configurable number of states (e.g., first state 405,second state 410, third state 415, and fourth state 420) that may besimilar to the state machine 400. Each of the plurality of statemachines may have an upper threshold (e.g., upper memory threshold) anda lower threshold (e.g., lower memory threshold) that defines memoryutilization factor, “U” that trigger a switch to another state (e.g.,between first state 405 and a second state 410) when the memoryutilization is outside the range defined by the upper memory thresholdand the lower memory threshold.

In some examples, the upper threshold may be a first upper memorythreshold 455 set at, e.g., U=0.25 (i.e., 25% of the total memory may beoccupied); between second state 410 and a third state 415, the upperthreshold may be a second upper memory threshold 460 set at, e.g.,U=0.50 (i.e., 50% of the total memory that may be occupied); betweenthird state 415 and a fourth state 420, the upper threshold may be athird upper memory threshold 465 set at, e.g., U=0.75 (i.e., 75% of thetotal memory may be used), etc.). Similarly, at first state, the lowerthreshold may be set at, e.g., U=0; between second state 410 and a thirdstate 415, the lower threshold may be a second lower memory threshold462 set at, e.g., U=0.25 (i.e., 25% of the total memory that may beoccupied), etc.). Again, although only four states are described withreference to state machine 450, it should be understood that any numbergreater or less than the four states may be employed to achieve thegoals of the present disclosure, e.g., depending on, for example, alevel of granularity desired in managing memory 230.

In some aspects, the computer device 105 may transition betweendifferent states depending on the memory utilization factor, U, in thesystem. For example, the computer device 105 may identify whether thememory utilization, U, is outside the range of a first upper memorythreshold (e.g., U=0.25) and a first lower memory threshold totransition from the first state 405 to the second state 410. Similarly,if the cleanup operations at the second state 410 fail to keep thememory utilization below a second memory threshold (e.g., U=0.50)because, for example, the amount of incoming traffic exceeds theoutgoing non-TCP packets that the computer device 105 may effectivelycleanup from the system, the computer device 105 may transition to thethird state 415 that employs more aggressive cleanup parameters.

Similar to state machine 400 described in FIG. 4A, here a decrease inthe memory utilization, at any state (e.g., such as the second state 410in the following example), relative to the memory threshold associatedwith the particular state may result in the computer device 105 tochange states and adjust the endpoint lifetime value 440 and the DPCinterval 445 to an earlier state (e.g., in one example, returning fromthe second state 410 to the first state 405) by increasing the endpointlifetime and the DPC interval before the memory cleanup is required whenthe memory utilization falls below the lower memory thresholds.

FIGS. 5A-5C are timing diagrams illustrating memory cleanup proceduresbased on various triggers in accordance with aspects of the presentdisclosure of the computer device 105 (e.g., server) operating memorymanagement system 200. In accordance with various aspects of the presentdisclosure, two types of expiring events may be contemplated: aninterval-based trigger (FIG. 5A) and/or a memory availability-basedtrigger (FIG. 5B). In some aspects, the two types of triggers may beperformed sequentially (see e.g., FIG. 5C).

Turning first to FIG. 5A, an interval-based trigger system timingdiagram 500 associated with an interval-based clean-up procedure ofmemory management system 200 is illustrated. In some examples, theinterval-based trigger system may be implemented by the memory cleanupcomponent 835 described with reference to FIG. 8. In accordance with theinterval-based trigger, the computer device 105 operating memorymanagement system 200 performs regular DPC cleanups at intervals definedby the cleanup interval parameter (e.g., DPC interval 445) when asufficient amount of memory 230 is available (e.g., the memory 230 ofthe server exceeds a memory available threshold). For purposes of thepresent disclosure, the terms “cleanup interval parameter” and “cleanupinterval value” may be used interchangeably. In some aspects, theinterval at which the DPC is triggered may be dictated by thestate-machine 400 of the computer device 105 (see FIG. 4) by adjustingthe cleanup interval parameter (e.g., DPC interval 445).

In some aspects of the present disclosure, when the memory managementsystem 200 is in the first state 405, the endpoint lifetime may be setto a lifetime default value (e.g., 60 seconds) and the DPC cleanupintervals may also be interval default value (e.g., 60 seconds). In someaspects, the DPC may be a kernel-mode procedures, and thus run for apredetermined maximum time period (e.g., 100 ms). Thus, in theillustrated diagram 500, the DPC may be triggered every 60 seconds,wherein at each trigger (time=0, 60, 120, 180 seconds), the DPCprocedure may execute for 100 ms each. Accordingly, in some cases, thelimitations of the 100 ms duration of the procedure may further limitthe number of non-TCP endpoints that the computer device 105 may removefrom the memory 230 at each trigger point. In some aspects of thepresent disclosure, the regular DPC may be triggered at the specifiedintervals in a round-robin fashion across all partitions 205, and eachDPC may clean a single partition at any one time.

Turning next to FIG. 5B, a memory availability-based trigger timingdiagram 505 associated with a memory availability-based procedure ofmemory management system 200 is illustrated. The memoryavailability-based trigger may be triggered in the wake of a memorypressure event (e.g., the memory 230 of the computer device 105 is lessthan the memory available threshold). In such instances when the memory230 is low, the computer device 105 may execute a “back-to-back DPC”procedure until the memory low condition is eased. Particularly, thecomputer device 105, upon determining that the memory 230 of thecomputer device 105 is less than a memory available threshold, maytrigger two or more consecutive DPC procedures to cleanup expirednon-TCP packets from the memory 230 until the available amount of memory230 exceeds the memory available threshold.

As was noted above, the DPC may be a kernel-mode procedure, and thus runfor a predetermined maximum time period (e.g., 100 ms). Thus in thememory availability-based trigger system, the computer device 105 mayexecute the DPC in back to back segments for 100 ms each. Thus, asillustrated in diagram 505, the computer device 105 may execute the DPCprocedures continuously (e.g., for 800 ms total) until such time thatthe available memory returns to acceptable levels.

Aspects of the present disclosure provide multiple methods ofdetermining whether the memory 230 of the computer device 105 satisfiesa memory available threshold. In one example, a low memory flag (e.g.,“LowNonPagedPoolCondition” flag) may be employed such that the flag isset when the amount of free memory falls below a system defined memoryavailable threshold. In such situations, DPC may be run back-to-back,e.g., consecutively, until the memory condition is eased as illustratedin FIG. 5B.

In contrast, when a high memory flag (e.g., “HighNonPagedPoolCondition”flag) is set, the computer device 105 may recognize that the memory 230of the computer device 105 exceeds a memory available threshold, andthus may schedule an interval-based DPC cleanup (see FIG. 5A). Thus theone or more flags may operate as trigger signals to determine which ofthe two cleanup procedures to execute.

Finally, FIG. 5C illustrates a timing diagram 515 associated with acombined cleanup procedure of memory management system 200, where thetwo DPC procedures (interval-based and memory availability-based) may beexecuted sequentially based on one or more memory conditions observed bythe computer device 105. Thus the timing diagram 515 illustrates thesystem behavior and DPC execution when the memory 230 starts to be full(e.g., at Time=0 seconds) and when the full memory condition is eased(e.g., at Time=0.8 seconds). Thus, so long as the system memory is lessthan the memory available threshold, the DPC may be executedback-to-back and continue to expire endpoints until the low memorycondition is eased. When the available memory exceeds the memoryavailable threshold, the DPC may revert to being executed at regularintervals based on the cleanup interval value/parameter specified by thecomputer device 105.

FIG. 6 is a flowchart of a method 600, implemented by the computerdevice 105 operating memory management system 200, for selecting one ormore cleanup procedure(s) based on memory availability trigger. In someexamples, the method 600 may be performed by the memory manager 220and/or the processor 805 (see FIG. 8) associated with the computerdevice 105. In some examples, the memory manager 220 may be an exampleof the memory manager 220 described with reference to FIG. 2.

In some examples, in addition to implementing an interval based cleanupof the memory, the memory manager 220 may trigger an immediate DPC tocleanup expired non-TCP from memory when the available memory is (ornear) full. Thus, at block 605, the memory manager 220 may determinewhether the memory 230 (i.e., one or more partitions 205 of the memory230) have an amount of free memory space less than a memory availablethreshold. The memory available threshold value may be eitherpredetermined or dynamically adjusted based on number of requests beingprocessed by the computer device 105.

If, at block 605, the memory manager 220 determines that the amount offree memory space in memory 230 of the computer device 105 is less thana memory available threshold, the memory manager 220 may trigger aback-to-back DPC procedure 610 (see FIG. 5B) to cleanup expired non-TCPpackets from the memory until such time that the amount of free memoryspace in memory 230 exceeds the memory available threshold. In contrast,if, at block 605, the memory manager 220 determines that the amount offree memory space in memory 230 exceeds the memory available threshold,the memory manager 220 may trigger a DPC interval procedure 615 (seeFIG. 5A). In some aspects, the memory manager 220 may continue themethod 600 in a loop as it continuously analyzes and monitors theutilization of memory 230.

FIG. 7 is a flowchart of an example method 700 of the state machine formanaging endpoint lifetime and Deferred Procedure Call (DPC) cleanupinterval based on either the number of non-TCP traffic stored in thememory or the memory utilization factor. The method 700 may be performedby the computer device 105 (e.g., server) operating memory managementsystem 200 as described with reference to FIGS. 1-6. Although the method700 is described below with respect to the elements of the computerdevice 105, other components may be used to implement one or more of thesteps described herein.

At block 705, the method 700 may include monitoring, at a server, anumber of non-TCP endpoints that are stored in a memory of the server.In some aspects, the computer device 105 may include a non-TCP endpointidentifier component 825 (see FIG. 8) configured to monitor the numberof non-TCP endpoints stored in one or more partitions of the memory.

At block 710, the method 700 may include determining whether the numberof non-TCP endpoints stored in the memory is outside of a range definedby a lower threshold and an upper threshold. In some examples, thecomputer device 105 may operate non-TCP endpoint identifier component825 (see FIG. 8) to determine whether the number of non-TCP endpoints isoutside the range of the upper endpoint threshold and a lower endpointthreshold.

Additionally or alternatively, the non-TCP endpoint identifier component825 may further monitor the memory utilization factor associated withthe memory of the server, and determine whether the non-TCP endpointparameter (e.g., when the non-TCP endpoint parameter represents memoryutilization factor) is outside of a range of lower memory utilizationthreshold and an upper memory utilization threshold). As noted above,aspects of the present disclosure allow for a system to transitionbetween a plurality of states depending on the number of endpoints, N,and the level of memory utilization, U, that may be stored in the system(e.g., in one or more partitions of the memory). If the number ofnon-TCP endpoints exceeds an upper endpoint threshold (e.g., 2,000endpoints for first threshold value), the computer device 105 maytransition to the next state where the endpoint lifetime may beshortened and the cleanup interval frequency increased in order to allowthe server to prune more endpoints as their numbers increase in thememory. Similarly, if the memory utilization exceeds the upper memorythreshold (e.g., 0.25 or 25 percentage of total memory), the computerdevice 105 may transition to the next state where the endpoint lifetimemay be shortened and the cleanup interval frequency increased in orderto allow the server to prune more endpoints as their numbers increase inthe memory.

In some aspects, at the next state (e.g., state 410 in FIGS. 4A and 4B),the non-TCP endpoint identifier component 825 may again monitor thememory utilization factor associated with the memory of the server, anddetermine whether the non-TCP endpoint parameter (e.g., when the non-TCPendpoint parameter represents memory utilization factor) is outside of arange of lower memory utilization threshold (e.g., U=0.25) and an uppermemory utilization threshold (e.g., U=0.50). If the non-TCP endpointparameter exceeds the upper memory utilization threshold, the non-TCPendpoint identifier component 825 may be configured to furthertransition to next state (e.g., state 415 in FIGS. 4A and 4B) where thecleanup procedures may be more aggressive (e.g., via reduced endpointlifetime value and cleanup interval). In contrast, if the non-TCPendpoint parameter is less than the lower threshold (e.g., U=0.25), thenon-TCP endpoint identifier component 825 may return to the previousstate (e.g., state 405 in FIGS. 4A and 4B). Even further, if the non-TCPendpoint parameter is not outside of a range of lower memory utilizationthreshold and an upper memory utilization threshold, the non-TCPendpoint identifier component 825 may maintain the computer device atits current state (e.g., state 410 in FIGS. 4A and 4B).

At block 715, the method 700 may include adjusting an endpoint lifetimevalue and a cleanup interval value in response to the number of non-TCPendpoints being outside the range defined by the lower threshold and theupper threshold. For example, in an aspect, the computer device 105 mayoperate a memory parameter adjustment component 830 (see FIG. 8) toadjust the endpoint lifetime value and the cleanup interval value basedon determining that the number of non-TCP endpoints and/or memoryutilization are outside the range of lower threshold and the upperthreshold. As discussed above, adjusting the endpoint lifetime value andthe cleanup interval value may be needed in order to maintain an optimallevel of free memory in the system while improving overall connectionspeed, firewall speeds, security, and system performance in terms of CPUutilization and memory consumption. In some examples, memory parameteradjustment component 830 may adjust the endpoint lifetime value and thecleanup interval value by decreasing the endpoint lifetime value and thecleanup interval value from a default value when the number of non-TCPendpoints and/or memory utilization exceeds the threshold. In someaspects, the default values may be different for each of the endpointlifetime value parameter and the cleanup interval value parameter. Forexample, a first default value associated with the endpoint lifetimevalue may be set at 60 seconds, while a second default value associatedwith the cleanup interval value may be set to 50 seconds. In otherexamples, the default values for both endpoint lifetime and cleanupinterval may be the same.

Thus, if the number of non-TCP endpoints and/or memory utilizationexceeds the upper threshold (e.g., N=2,000 endpoints or U=0.25 for firstthreshold value), the computer device 105 executing memory parameteradjustment component 830 may shorten the endpoint lifetime value from 60seconds to 30 seconds for the next state. Concurrently, the computerdevice 105 may also shorten the cleanup interval value from 60 secondsto, for example, 40 seconds for the next state. Thus, in some aspects,memory parameter adjustment component 830 may decrease the endpointlifetime value by reducing an idle threshold that specifies a length oftime that a non-TCP endpoints has to be inactive to be classified asidle in the memory 230. Similarly, memory parameter adjustment component830 may decrease the cleanup interval value by decreasing a timeinterval that the computer device 105 waits before triggering a DPC tocleanup expired endpoints from the memory 230.

If, at the subsequent state, the number of non-TCP endpoints and/ormemory utilization is less than the lower threshold (e.g., N=2,000endpoints or U=0.25), the computer device 105 executing memory parameteradjustment component 830 may increase the endpoint lifetime value andthe cleanup interval value from the default value (or the previouslyadjusted values). Therefore, in some examples, memory parameteradjustment component 830 may increase the endpoint lifetime value byincreasing an idle threshold that specifies a length of time that anon-TCP endpoints has to be inactive to be classified as idle in thememory 230, and may increase the cleanup interval value by increasing atime interval that the computer device 105 waits before triggering adeferred procedure call (DPC) to cleanup expired endpoints from thememory 230. Similarly, if, at a given state (e.g., state 410 in FIGS. 4Aand 4B), the number of non-TCP endpoints and/or memory utilizationexceeds the upper threshold (e.g., N=3,000 endpoints or U=0.50), thecomputer device 105 executing memory parameter adjustment component 830may further decrease the endpoint lifetime value and the cleanupinterval value from the default value (or the previously adjustedvalues). In such aspects, the computer device 105 dynamically monitorswhether the non-TCP endpoint parameter is outside of a range of a lowerthreshold and upper threshold prior to adjusting (or maintaining) theendpoint lifetime value and the cleanup interval value.

At block 720, the method 700 may include removing one or more of thenon-TCP endpoints from the memory of the server in response to at leastone of the adjusted endpoint lifetime value and the adjusted cleanupinterval value. In some examples, removing the one or more of non-TCPendpoints from the memory includes removing one or more idle non-TCPendpoints from the memory. For example, in an aspect, the computerdevice 105 may operate a memory cleanup component 835 (see FIG. 8) toremove a plurality of idle non-TCP endpoints from the memory 230 basedon the endpoint lifetime value and the cleanup interval value. In someexamples, removing the plurality of non-TCP endpoints from the memorymay include memory cleanup component 835 initiating a DPC procedures toclean up the non-TCP endpoints from one or more partitions in thememory. In some aspects, memory cleanup component 835 may remove idlenon-TCP endpoints uniformly across all partitions 205 in memory 230.

Referring now to FIG. 8, illustrated is an example computer device 105in accordance with an aspect, including additional component details ascompared to FIG. 1. In some examples, the computer device 105 may be anexample of a server described with reference to FIGS. 1 and 2. In oneaspect, computer device 105 may include processor 805 for carrying outprocessing functions associated with one or more of components andfunctions (e.g., methods 300, 600, 700, and state machine 400) describedherein. Processor 805 can include a single or multiple set of processorsor multi-core processors. Moreover, processor 805 can be implemented asan integrated processing system and/or a distributed processing system.In one or more examples, the state machine 400 may be implemented orexecuted by the processor 805.

Computer device 105 may further include memory 230, such as for storinglocal versions of applications being executed by processor 805. In someexamples, the operations of the memory 810 may be managed by theprocessor 805 or the memory manager 220 described with reference to FIG.2 and FIG. 6. Memory 230 can include a type of memory usable by acomputer, such as random access memory (RAM), read only memory (ROM),tapes, magnetic discs, optical discs, volatile memory, non-volatilememory, and any combination thereof. Additionally, processor 805 andmemory 230 may include and execute operating system (not shown).

Further, computer device 105 may include a communications component 815that provides for establishing and maintaining communications with oneor more parties utilizing hardware, software, and services as describedherein. Communications component 815 may carry communications betweencomponents on computer device 105, as well as between computer device105 and external devices, such as devices located across acommunications network and/or devices serially or locally connected tocomputer device 105. For example, communications component 815 mayinclude one or more buses, and may further include transmit chaincomponents and receive chain components associated with a transmitterand receiver, respectively, operable for interfacing with externaldevices.

Computer device 105 may also include a user interface component 820operable to receive inputs from a user of computer device 105 andfurther operable to generate outputs for presentation to the user. Userinterface component 820 may include one or more input devices, includingbut not limited to a keyboard, a number pad, a mouse, a touch-sensitivedisplay, a navigation key, a function key, a microphone, a voicerecognition component, any other mechanism capable of receiving an inputfrom a user, or any combination thereof. Further, user interfacecomponent 820 may include one or more output devices, including but notlimited to a display, a speaker, a haptic feedback mechanism, a printer,any other mechanism capable of presenting an output to a user, or anycombination thereof.

Computer device 105 may additionally include memory management system200 operating one or more components defining memory manager 220 andstate machine 400. For example, memory management system 200 includesnon-TCP endpoint identifier component 825 operable for identifying anumber of non-TCP endpoints that may be idle in a memory of the serverand determining whether the number of non-TCP endpoints exceeds anendpoint threshold. In addition, memory management system 200 mayinclude a memory parameter adjustment component 830 operable to adjustone or more parameters associated with the non-TCP endpoints. Forexample, the memory parameter adjustment component 830 may be configuredto adjust an endpoint lifetime value and the cleanup interval value thatis associated with the endpoint threshold.

Additionally or alternatively, memory management system 200 may includememory cleanup component 835 operable for initiating memory cleanupbased on a trigger from the processor 805 or memory manager 220 (seeFIG. 2). In some aspects, the memory cleanup component 835 may remove aplurality of non-TCP endpoints from the one or more partitions of thememory of the computer device 105 based on the endpoint lifetime valueand the cleanup interval value allocated by the memory parameteradjustment component 830.

As used in this application, the terms “component,” “system” and thelike are intended to include a computer-related entity, such as but notlimited to hardware, firmware, a combination of hardware and software,software, or software in execution. For example, a component may be, butis not limited to being, a process running on a processor, a processor,an object, an executable, a thread of execution, a program, and/or acomputer. By way of illustration, both an application running on acomputing device and the computing device can be a component. One ormore components can reside within a process and/or thread of executionand a component may be localized on one computer and/or distributedbetween two or more computers. In addition, these components can executefrom various computer readable media having various data structuresstored thereon. The components may communicate by way of local and/orremote processes such as in accordance with a signal having one or moredata packets, such as data from one component interacting with anothercomponent in a local system, distributed system, and/or across a networksuch as the Internet with other systems by way of the signal.

Furthermore, various aspects are described herein in connection with adevice (e.g., computer device 105), which can be a wired device or awireless device. A wireless device may be a cellular telephone, asatellite phone, a cordless telephone, a Session Initiation Protocol(SIP) phone, a wireless local loop (WLL) station, a personal digitalassistant (PDA), a handheld device having wireless connectioncapability, a computing device, or other processing devices connected toa wireless modem. In contract, a wired device may include a serveroperable in a data centers (e.g., cloud computing).

It is understood that the specific order or hierarchy of blocks in theprocesses/flow charts disclosed is an illustration of exemplaryapproaches. Based upon design preferences, it is understood that thespecific order or hierarchy of blocks in the processes/flow charts maybe rearranged. Further, some blocks may be combined or omitted. Theaccompanying method claims present elements of the various blocks in asample order, and are not meant to be limited to the specific order orhierarchy presented.

The previous description is provided to enable any person skilled in theart to practice the various aspects described herein. Variousmodifications to these aspects will be readily apparent to those skilledin the art, and the generic principles defined herein may be applied toother aspects. Thus, the claims are not intended to be limited to theaspects shown herein, but is to be accorded the full scope consistentwith the language claims, wherein reference to an element in thesingular is not intended to mean “one and only one” unless specificallyso stated, but rather “one or more.” The word “exemplary” is used hereinto mean “serving as an example, instance, or illustration.” Any aspectdescribed herein as “exemplary” is not necessarily to be construed aspreferred or advantageous over other aspects. Unless specifically statedotherwise, the term “some” refers to one or more. Combinations such as“at least one of A, B, or C,” “at least one of A, B, and C,” and “A, B,C, or any combination thereof” include any combination of A, B, and/orC, and may include multiples of A, multiples of B, or multiples of C.Specifically, combinations such as “at least one of A, B, or C,” “atleast one of A, B, and C,” and “A, B, C, or any combination thereof” maybe A only, B only, C only, A and B, A and C, B and C, or A and B and C,where any such combinations may contain one or more member or members ofA, B, or C. All structural and functional equivalents to the elements ofthe various aspects described throughout this disclosure that are knownor later come to be known to those of ordinary skill in the art areexpressly incorporated herein by reference and are intended to beencompassed by the claims. Moreover, nothing disclosed herein isintended to be dedicated to the public regardless of whether suchdisclosure is explicitly recited in the claims. No claim element is tobe construed as a means plus function unless the element is expresslyrecited using the phrase “means for.”

It should be appreciated to those of ordinary skill that various aspectsor features are presented in terms of systems that may include a numberof devices, components, modules, and the like. It is to be understoodand appreciated that the various systems may include additional devices,components, modules, etc. and/or may not include all of the devices,components, modules etc. discussed in connection with the figures.

The various illustrative logics, logical blocks, and actions of methodsdescribed in connection with the embodiments disclosed herein may beimplemented or performed with a specially-programmed one of a generalpurpose processor, a digital signal processor (DSP), an applicationspecific integrated circuit (ASIC), a field programmable gate array(FPGA) or other programmable logic device, discrete gate or transistorlogic, discrete hardware components, or any combination thereof designedto perform the functions described herein. A general-purpose processormay be a microprocessor, but, in the alternative, the processor may beany conventional processor, controller, microcontroller, or statemachine. A processor may also be implemented as a combination ofcomputing devices, e.g., a combination of a DSP and a microprocessor, aplurality of microprocessors, one or more microprocessors in conjunctionwith a DSP core, or any other such configuration. Additionally, at leastone processor may comprise one or more components operable to performone or more of the steps and/or actions described above.

Further, the steps and/or actions of a method or algorithm described inconnection with the aspects disclosed herein may be embodied directly inhardware, in a software module executed by a processor, or in acombination of the two. A software module may reside in RAM memory,flash memory, ROM memory, EPROM memory, EEPROM memory, registers, a harddisk, a removable disk, a CD-ROM, or any other form of storage mediumknown in the art. An exemplary storage medium may be coupled to theprocessor, such that the processor can read information from, and writeinformation to, the storage medium. In the alternative, the storagemedium may be integral to the processor. Further, in some aspects, theprocessor and the storage medium may reside in an ASIC. Additionally,the ASIC may reside in a user terminal. In the alternative, theprocessor and the storage medium may reside as discrete components in auser terminal. Additionally, in some aspects, the steps and/or actionsof a method or algorithm may reside as one or any combination or set ofcodes and/or instructions on a machine readable medium and/or computerreadable medium, which may be incorporated into a computer programproduct.

In one or more aspects, the functions described may be implemented inhardware, software, firmware, or any combination thereof. If implementedin software, the functions may be stored or transmitted as one or moreinstructions or code on a computer-readable medium. Computer-readablemedia includes both computer storage media and communication mediaincluding any medium that facilitates transfer of a computer programfrom one place to another. A storage medium may be any available mediathat can be accessed by a computer. By way of example, and notlimitation, such computer-readable media can comprise RAM, ROM, EEPROM,CD-ROM or other optical disk storage, magnetic disk storage or othermagnetic storage devices, or any other medium that can be used to carryor store desired program code in the form of instructions or datastructures and that can be accessed by a computer. Also, any connectionmay be termed a computer-readable medium. For example, if software istransmitted from a website, server, or other remote source using acoaxial cable, fiber optic cable, twisted pair, digital subscriber line(DSL), or wireless technologies such as infrared, radio, and microwave,then the coaxial cable, fiber optic cable, twisted pair, DSL, orwireless technologies such as infrared, radio, and microwave may beincluded in the definition of medium. Disk and disc, as used herein,includes compact disc (CD), laser disc, optical disc, digital versatiledisc (DVD), floppy disk and Blu-ray disc where disks usually reproducedata magnetically, while discs usually reproduce data optically withlasers. Combinations of the above should also be included within thescope of computer-readable media.

While aspects of the present disclosure have been described inconnection with examples thereof, it will be understood by those skilledin the art that variations and modifications of the aspects describedabove may be made without departing from the scope hereof. Other aspectswill be apparent to those skilled in the art from a consideration of thespecification or from a practice in accordance with aspects disclosedherein.

What is claimed is:
 1. A method of managing non-Transmission ControlProtocol (TCP) packets comprising: monitoring, at a server, a number ofnon-TCP endpoints that are stored in a memory of the server; determiningwhether the number of non-TCP endpoints stored in the memory is outsideof a range defined by a lower threshold and an upper threshold;adjusting an endpoint lifetime value and a cleanup interval value inresponse to the number of non-TCP endpoints being outside the rangedefined by the lower threshold and the upper threshold; and removing oneor more of non-TCP endpoints from the memory of the server in responseto at least one of the adjusted endpoint lifetime value and the adjustedcleanup interval value.
 2. The method of claim 1, wherein adjusting theendpoint lifetime value and the cleanup interval value in response tothe number of non-TCP endpoints being outside the range defined by thelower threshold and the upper threshold, comprises: decreasing theendpoint lifetime value and the cleanup interval value from a defaultvalue if the number of non-TCP endpoints exceeds the upper threshold;and increasing the endpoint lifetime value and the cleanup intervalvalue from the default value if the number of non-TCP endpoints is lessthan the lower threshold.
 3. The method of claim 2, wherein decreasingthe endpoint lifetime value comprises reducing an idle threshold thatspecifies a length of time that a non-TCP endpoint has to be inactive tobe classified as idle in the memory, and wherein decreasing the cleanupinterval value comprises decreasing a time interval that the serverwaits before triggering a memory cleanup operation to cleanup expiredendpoints from the memory.
 4. The method of claim 2, wherein increasingthe endpoint lifetime value comprises increasing an idle threshold thatspecifies a length of time that a non-TCP endpoint has to be inactive tobe classified as idle in the memory, and wherein increasing the cleanupinterval value comprises increasing a time interval that the serverwaits before triggering a memory cleanup operation to cleanup expiredendpoints from the memory.
 5. The method of claim 1, further comprising:identifying, at the server, a number of active cores in a system;determining a number of partitions to generate in the memory of theserver based on the number of active cores, wherein each of the numberof partitions includes a unique reader-writer lock; and distributingincoming non-TCP packets uniformly across the number of partitions. 6.The method of claim 1, wherein removing the one or more of non-TCPendpoints from the memory of the server in response to at least one ofthe adjusted endpoint lifetime value and the adjusted cleanup intervalvalue comprises: removing one or more of idle non-TCP endpointsuniformly from across a plurality of memory partitions.
 7. The method ofclaim 1, further comprising: determining that an amount of free space inthe memory of the server is less than a memory available threshold; andtriggering a memory cleanup operation to cleanup expired non-TCP packetsfrom the memory until the amount of free space in the memory of theserver exceeds the memory available threshold.
 8. The method of claim 1,wherein the number of non-TCP endpoints corresponds to a number ofnon-TCP connections including a local endpoint and a remote endpoint. 9.A computing device for managing non-Transmission Control Protocol (TCP)packets comprising: a processor; a memory coupled to the processor,wherein the memory includes instructions executable by the processor to:monitor, at a server, a number of non-TCP endpoints that are stored inthe memory of the server; determine whether the number of non-TCPendpoints stored in the memory is outside of a range defined by a lowerthreshold and an upper threshold; adjust an endpoint lifetime value anda cleanup interval value in response to the number of non-TCP endpointsbeing outside the range defined by the lower threshold and the upperthreshold; and remove one or more of non-TCP endpoints from the memoryof the server in response to at least one of the adjusted endpointlifetime value and the adjusted cleanup interval value.
 10. Thecomputing device of claim 9, wherein the instructions executable by theprocessor to adjust the endpoint lifetime value and the cleanup intervalvalue in response to the number of non-TCP endpoints being outside therange defined by the lower threshold and the upper threshold, furtherincludes instructions to: decrease the endpoint lifetime value and thecleanup interval value from a default value when the number of non-TCPendpoints exceeds the upper threshold; and increase the endpointlifetime value and the cleanup interval value from the default valuewhen the number of non-TCP endpoints is less than the lower threshold.11. The computing device of claim 10, wherein the instructionsexecutable by the processor to decrease the endpoint lifetime valuecomprises reducing an idle threshold that specifies a length of timethat a non-TCP endpoint has to be inactive to be classified as idle inthe memory, and wherein the instructions executable by the processor todecrease the cleanup interval value comprises instructions to decrease atime interval that the server waits before triggering a memory cleanupoperation to cleanup expired endpoints from the memory.
 12. Thecomputing device of claim 10, wherein the instructions executable by theprocessor to increase the endpoint lifetime value comprises instructionsto increase an idle threshold that specifies a length of time that anon-TCP endpoint has to be inactive to be classified as idle in thememory, and wherein the instructions executable by the processor toincrease the cleanup interval value comprises instructions to increase atime interval that the server waits before triggering a memory cleanupoperation to cleanup expired endpoints from the memory.
 13. Thecomputing device of claim 9, wherein the instructions are furtherexecutable by the processor to: identify, at the server, a number ofactive cores in a system; determine a number of partitions to generatein the memory of the server based on the number of active cores, whereineach of the number of partitions includes a unique reader-writer lock;and distribute incoming non-TCP packets uniformly across the number ofpartitions.
 14. The computing device of claim 9, wherein theinstructions are further executable by the processor to: remove aplurality of idle non-TCP endpoints uniformly from across a plurality ofmemory partitions.
 15. The computing device of claim 9, wherein theinstructions are further executable by the processor to: determine thatan amount of free space in the memory of the server is less than amemory available threshold; and trigger a memory cleanup operation tocleanup expired non-TCP packets from the memory until the amount of freespace in the memory of the server exceeds the memory availablethreshold.
 16. A computer-readable medium for managing non-TransmissionControl Protocol (TCP) packets comprising instructions for: monitoring,at a server, a number of non-TCP endpoints that are stored in a memoryof the server; determining whether the number of non-TCP endpointsstored in the memory is outside of a range defined by a lower thresholdand an upper threshold; adjusting an endpoint lifetime value and acleanup interval value in response to the number of non-TCP endpointsbeing outside the range defined by the lower threshold and the upperthreshold; and removing one or more of non-TCP endpoints from the memoryof the server in response to at least one of the adjusted endpointlifetime value and the adjusted cleanup interval value.
 17. Thecomputer-readable medium of claim 16, wherein the instructions foradjusting the endpoint lifetime value and the cleanup interval value inresponse to the number of non-TCP endpoints being outside the rangedefined by the lower threshold and the upper threshold further includeinstructions for: decreasing the endpoint lifetime value and the cleanupinterval value from a default value if the number of non-TCP endpointsexceeds the upper threshold; and increasing the endpoint lifetime valueand the cleanup interval value from the default value if the number ofnon-TCP endpoints is less than the lower threshold.
 18. Thecomputer-readable medium of claim 17, wherein the instructions fordecreasing the endpoint lifetime value comprises instructions forreducing an idle threshold that specifies a length of time that anon-TCP endpoint has to be inactive to be classified as idle in thememory, and wherein the instructions for decreasing the cleanup intervalvalue comprises instructions for decreasing a time interval that theserver waits before triggering a memory cleanup operation to cleanupexpired endpoints from the memory.
 19. The computer-readable medium ofclaim 17, wherein the instructions for increasing the endpoint lifetimevalue further comprise instructions for increasing an idle thresholdthat specifies a length of time that a non-TCP endpoint has to beinactive to be classified as idle in the memory, and wherein theinstructions for increasing the cleanup interval value further compriseinstructions for increasing a time interval that the server waits beforetriggering a memory cleanup operation to cleanup expired endpoints fromthe memory.
 20. The computer-readable medium of claim 16, wherein theinstructions are further executable for: identifying, at the server, anumber of active cores in a system; determining a number of partitionsto generate in the memory of the server based on the number of activecores, wherein each of the number of partitions includes a uniquereader-writer lock; and distributing incoming non-TCP packets uniformlyacross the number of partitions.